package com.innovation.wjrpc.example;

import java.util.concurrent.CompletableFuture;

/**
 * @author innoyiya
 * @date 2021/3/6 16:46
 */
public interface CalcService {

    int add(int num1, int num2);

    int minus(int num1, int num2);

    default CompletableFuture<Integer> add(int num1, int num2, boolean isAsynch) {
        return CompletableFuture.completedFuture(add(num1, num2));
    }

    default CompletableFuture<Integer> minus(int num1, int num2, boolean isAsynch) {
        return CompletableFuture.completedFuture(minus(num1, num2));
    }
}
